package Lab02.Q6;
import java.util.Scanner;

public class sqTable {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int num=in.nextInt();
        for(int i=1;i<=num*num;i++){
            System.out.printf(i+" ");//或者print都可以
            if(i%num==0)
                System.out.println();
        }
    }
}
